﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Data;
using System.Data.SqlClient;
using ThongTin;

namespace DuLieu
{
    public class MonHoc_DL
    {
        KetNoi_DL ketnoi = new KetNoi_DL();
        public DataTable DanhSachMonHoc()
        {
            return ketnoi.LayDuLieu("DanhSachMonHoc");
        }
        //them sinh vien
        public int ThemMonHoc(MonHoc_TT MH)
        {
            int Nparameter = 3;
            string[] name = new string[Nparameter];
            object[] value = new object[Nparameter];
            name[0] = "@MaMonHoc"; value[0] = MH.MaMonHoc;
            name[1] = "@TenMonHoc"; value[1] = MH.TenMonHoc;
            name[2] = "@SoTinChi"; value[2] = MH.SoTinChi;
            return ketnoi.CapNhat("ThemMonHoc", name, value, Nparameter);
        }

    }
}
